package com.itheima.da_te_be;

import org.apache.ibatis.annotations.Many;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.junit.internal.Classes;

import java.util.List;

public interface ClassMopper {
    @Select("SELECT * FROM classes")
    @Results({
            @Result(column = "id" ,property = "id"),
            @Result(column = "name",property = "name"),
            @Result(
                    property = "students",
                    javaType = List.class,
                    column = "id",


                    many = @Many(select = "com.itheima.da_te_be.StudentMapper.selectByid")
            )
    })
    public abstract List<Classes> slsectAll();
}
